#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Time: 2022/9/16 20:06
# @Author: 刘航
# @Email: xxx@gmail.com
# @File：modify_cust_page.py
"""
客户编辑界面
"""
from selenium.webdriver.common.by import By
from pages.base_page import BasePage
from selenium.webdriver.support.select import Select
class ModifyCustPage(BasePage):
    industry_locator = (By.CSS_SELECTOR,"#industry")
    save_locator = (By.CSS_SELECTOR,"input.btn:nth-child(1)")

    def select_industry(self,industry):
        """选择客户行业"""
        select_elenium = self.driver.find_element(*self.industry_locator)
        Select(select_elenium).select_by_visible_text(industry)
    def save_btn(self):
        """点击保存按钮"""
        self.driver.find_element(*self.save_locator).click()

